import { http, Method } from "@/utils/request.js";
/**
 银行卡列表
 */
export function getCardList() {
  return http.request({
    url: `/member/bankCard/list`,
    method: Method.GET,
    needToken: true,
    loading: false,
  });
}
/**
 银行卡颜色
 */
export function getCardColor(data) {
  return http.request({
    url: `/member/bankCard/get/`+data,
    method: Method.GET,
    needToken: true,
    loading: false,
  });
}
/**
 添加银行卡
 */
export function addBankCardAPI(data) {
  return http.request({
    url: `/member/bankCard/addBankCard`,
    method: Method.POST,
	data:data,
    needToken: true,
    loading: false,
  });
}

/**
 修改银行卡
 */
export function updateBankCardAPI(data) {
  return http.request({
    url: `/member/bankCard/updateBankCard`,
    method: Method.POST,
	data:data,
    needToken: true,
    loading: false,
  });
}
/**
 默认支付银行卡
 */
export function defaultCardAPI(data) {
  return http.request({
    url: `/member/bankCard/get/default/`+data,
    method: Method.GET,
    needToken: true,
    loading: false,
  });
}
/**
 第一次获取验证码
 */
export function fastpayAPI(data) {
  return http.request({
    url: `/payment/ysPay/fastpay`,
    method: Method.POST,
	data:data,
    needToken: true,
    loading: false,
  });
}
/**
 除了第一次验证码
 */
export function retrieveCodeAPI(data) {
  return http.request({
    url: `/payment/ysPay/retrieveCode`,
    method: Method.POST,
	data:data,
    needToken: true,
    loading: false,
  });
}
/**
 去支付
 */
export function fastpayAuthorizeAPI(data) {
  return http.request({
    url: `/payment/ysPay/fastpayAuthorize`,
    method: Method.POST,
	data:data,
    needToken: true,
    loading: false,
  });
}